package com.example.myapplication.entity

import android.os.Parcel
import android.os.Parcelable

data class WorkNoticeDetailBean(
    var typecode: String = "",
    var title: String = "",
    var cname: String = "",
    var clientid: String = "",
    var billtype: String = "",
    var billtypename: String = "",
    var id: String = "",
    var code: String = "",
    var rq: String = "",
    var je: String = "",
) : Parcelable {

    constructor(parcel: Parcel) : this(
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: "",
        parcel.readString() ?: ""
    )

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(typecode)
        parcel.writeString(title)
        parcel.writeString(cname)
        parcel.writeString(clientid)
        parcel.writeString(billtype)
        parcel.writeString(billtypename)
        parcel.writeString(id)
        parcel.writeString(code)
        parcel.writeString(rq)
        parcel.writeString(je)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<WorkNoticeDetailBean> {
        override fun createFromParcel(parcel: Parcel): WorkNoticeDetailBean {
            return WorkNoticeDetailBean(parcel)
        }

        override fun newArray(size: Int): Array<WorkNoticeDetailBean?> {
            return arrayOfNulls(size)
        }
    }
}